<h3><strong>添加一个考题</strong></h3>
<div class="text-center">
  <h4><span class="text-muted">1.选择选项</span> | <strong>2.添加题目内容</strong></h4>
</div>

<hr>

<%= form_for @question, url: admin_question_path(@question) do |f| %>
    <div class="form-group">
      <h4><strong><i class="fa fa-pencil-square-o" aria-hidden="true"></i>问题内容</strong></h4>
      <%= f.text_field :text, class: "form-control input-lg" %>
    </div>
    <% if @question.options.to_i != 0 %>
        <% @question.options.times do |i| %>
            <div class="form-group">
              <h4><strong><i class="fa fa-pencil-square-o" aria-hidden="true"></i> Option <%= i + 1 %>:</strong></h4>
              <%= f.fields_for :response_options do |response_option| %>
                  <%= response_option.text_field :text, class: 'form-control' %>
              <% end %>
            </div>
        <% end %>
    <% end %>
    <div class="form-group">
      <%= f.submit "确定", class: "btn btn-primary btn-lg btn-block" %>
    </div>
<% end %>
<h4><%= link_to "返回前一步", edit_admin_question_path(@question) %></h4>
